class Solution(object):
    def rearrangeArray(self, nums):
        zheng = []
        fu = []
        for num in nums:
            if num > 0:
                zheng.append(num)
            else:
                fu.append(num)
        ans = []
        for i in range(len(nums) // 2):
            ans.append(zheng[i])
            ans.append(fu[i])
        return ans